/*
 * @Description:环境数据项
 */
import request from '@/utils/request'
export default {
    //添加
    add(data) {
        return request.post(`/v3/iot/environmentalData/add`, {
            ...data,
            farmingTypeNo: sessionStorage.farmingTypeNo
        })
    },
    //编辑
    edit(data) {
        return request.put(`/v3/iot/environmentalData/edit`, { ...data })
    },
    //批量删除
    delList(list) {
        return request.delete(`/v3/iot/environmentalData/delListById?ids=${list}`)
    },
    //条件查询
    queryByCondition(data) {
        return request.post(`/v3/iot/environmentalData/queryByCondition`, { ...data })
    },
    //分页查询
    queryPageByCondition(data) {
        return request.post(`/v3/iot/environmentalData/queryPageByCondition`, {
            ...data,
            entity: {
                ...data.entity,
                farmingTypeNo: sessionStorage.farmingTypeNo,
            }
        })
    },
};
